package com.everyday.practice.leetCode;

import java.util.HashMap;
import java.util.Map;

/**
 * @description:
 * @author: leon
 * @time: 2021/4/7 11:13
 */
public class Title79 {
    public static void main(String[] args) {

    }
    public boolean exist(char[][] board, String word) {
        String[] split = word.split("");
        Map<Map<Integer,Integer>,String> map=new HashMap<>();
        for (int i=0;i<board.length;i++){
            for (int j=0;j<board[i].length;j++){
                Map<Integer,Integer> indexMap=new HashMap<>();
                indexMap.put(i,j);
                map.put(indexMap,Character.toString(board[i][j]));
            }
        }
        for (int i=0;i<split.length;i++){
            String str=split[i];
            for (Map<Integer,Integer> indexMap:map.keySet()){
                String s = map.get(indexMap);
                if (s.equals(str)){
                    Map<Integer,Integer> readyMap=new HashMap<>();
                    readyMap.putAll(indexMap);
                }
            }
        }
        return false;
    }

}
